1 00:00:00,430 --> 00:00:01,060 Hey there. 2 00:00:01,060 --> 00:00:02,020 Welcome back. 3 00:00:02,020 --> 00:00:06,670 In this next section of our project, we're going to start scripting one of the fundamental systems 4 00:00:06,670 --> 00:00:09,130 for the game which are guns. 5 00:00:09,160 --> 00:00:13,420 Now before we start scripting our guns I want to go ahead and walk through the different properties 6 00:00:13,420 --> 00:00:17,860 I have in mind for each of our guns, to fully customize them in whatever way we want. 7 00:00:17,890 --> 00:00:22,660 We're going to be able to customize the fire rate, how much ammo the guns have, how much damage they 8 00:00:22,660 --> 00:00:27,970 deal, what the base damage should be, and how much we should multiply that damage based on what limb 9 00:00:27,970 --> 00:00:29,710 a bullet hits, and so on. 10 00:00:29,710 --> 00:00:33,490 So let's get started setting up the properties for our guns. 11 00:00:33,490 --> 00:00:35,740 Our guns are currently stored in server storage. 12 00:00:35,740 --> 00:00:40,540 If we go into the tools folder here, we have our different array of guns that we're going to be able 13 00:00:40,540 --> 00:00:43,870 to customize and that players can purchase from our shop. 14 00:00:43,900 --> 00:00:48,580 The first one we can go ahead and create a properties module script for will be like our pistol, because 15 00:00:48,580 --> 00:00:52,420 this will be the basic first gun that most players will likely buy. 16 00:00:52,420 --> 00:00:56,440 So we'll create a module script and we'll call it our properties. 17 00:00:57,380 --> 00:00:59,630 And inside of here I'm going to define a table. 18 00:00:59,630 --> 00:01:04,250 I'll just call it self and we'll make sure to return self at the end of our module script. 19 00:01:04,250 --> 00:01:08,060 And inside of here is where we'll store all the properties for our guns. 20 00:01:08,060 --> 00:01:15,620 I want to have a section relating to any damage properties, maybe a section to define the other miscellaneous 21 00:01:15,620 --> 00:01:17,090 gun properties. 22 00:01:17,570 --> 00:01:23,840 I want to have a section to store the different animations for our guns, as well as the sounds for 23 00:01:23,840 --> 00:01:28,490 our guns and any other kind of miscellaneous properties. 24 00:01:29,450 --> 00:01:33,200 So for the base damage of our gun, we could just create a property like damage. 25 00:01:33,200 --> 00:01:35,570 And for my pistol, I want it to be relatively low. 26 00:01:35,570 --> 00:01:37,520 So I could do a value of like 14. 27 00:01:37,520 --> 00:01:43,370 And then next I want to define a table that defines how much we should multiply this base damage by 28 00:01:43,370 --> 00:01:46,070 depending on what limb we hit on a character. 29 00:01:46,070 --> 00:01:49,550 So we can call this our body part multipliers. 30 00:01:50,130 --> 00:01:56,940 And we basically just want to have a key of all of the different names of the limbs and a player's character. 31 00:01:56,940 --> 00:02:00,750 So if we go and we build an AR 15 rig. 32 00:02:02,410 --> 00:02:03,910 And we go ahead and look inside of it. 33 00:02:03,910 --> 00:02:07,420 There are a bunch of different limbs that are bullet can hit. 34 00:02:07,420 --> 00:02:10,180 It can hit the upper torso or the lower torso. 35 00:02:10,180 --> 00:02:15,460 It can hit the head, a foot, a hand, an arm, or even the humanoid root part. 36 00:02:15,460 --> 00:02:20,710 So we want to be able to define how much we should multiply the base damage by like for example, if 37 00:02:20,710 --> 00:02:21,700 we get a headshot. 38 00:02:22,030 --> 00:02:26,860 So let's go ahead and create keys for each one of these limbs inside of our table. 39 00:02:26,860 --> 00:02:31,390 We'll have one for the head, and by default I'm just going to set these values to one. 40 00:02:31,390 --> 00:02:31,810 For now. 41 00:02:31,810 --> 00:02:33,520 We'll have an upper torso. 42 00:02:34,060 --> 00:02:36,520 We will have a lower torso. 43 00:02:38,600 --> 00:02:43,520 We'll have a left foot, a right foot. 44 00:02:44,920 --> 00:02:51,520 Will have a left lower leg as well as a right lower leg. 45 00:02:52,800 --> 00:02:57,720 Will have a left upper leg and a right upper leg. 46 00:02:59,320 --> 00:03:02,890 We'll have a left hand and a right hand. 47 00:03:05,580 --> 00:03:07,800 We'll have a left lower arm. 48 00:03:09,480 --> 00:03:15,300 A right lower arm will have a left upper arm. 49 00:03:17,100 --> 00:03:18,630 A right upper arm. 50 00:03:18,630 --> 00:03:22,230 And finally we'll have the humanoid root part. 51 00:03:22,590 --> 00:03:27,570 Okay, so for our pistol, these are the values that we're going to multiply our base damage by for 52 00:03:27,570 --> 00:03:30,480 when we get like a headshot or an upper torso shot or whatever. 53 00:03:30,480 --> 00:03:36,270 So for the headshot, I'm thinking we should multiply the value by like four so they can deal more damage. 54 00:03:36,270 --> 00:03:40,620 When they get a headshot for the upper torso, we can multiply it by a little bit more. 55 00:03:40,620 --> 00:03:46,140 We could do like 1.2 for the upper torso, the lower torso, as well as the humanoid root part. 56 00:03:46,140 --> 00:03:51,150 Because the humanoid root part is going to be encompassing both the upper torso and the lower torso 57 00:03:51,150 --> 00:03:56,220 for the foot, we kind of want to deal like very little damage because we're hitting a foot. 58 00:03:56,220 --> 00:04:00,750 So we could do like a value of 0.35 and do that for the other foot. 59 00:04:00,750 --> 00:04:03,180 And we could do the same thing for the hands as well. 60 00:04:03,180 --> 00:04:06,510 We don't want to deal a lot of damage when they hit those kind of limbs. 61 00:04:06,510 --> 00:04:11,640 For the lower portion of the leg, we could do a little bit less damage, like 0.8.8. 62 00:04:11,640 --> 00:04:17,640 And for the upper legs, we could do like 0.9, 0.9. 63 00:04:17,760 --> 00:04:20,790 For the lower arm, we could do something like, I don't know, 0.6. 64 00:04:20,790 --> 00:04:22,680 I'm just kind of throwing out numbers here. 65 00:04:22,680 --> 00:04:25,560 We'll be able to experiment and adjust these values later. 66 00:04:25,560 --> 00:04:29,310 And then for the upper arm we could do something like 0.7 and 0.7. 67 00:04:30,160 --> 00:04:30,670 Okay. 68 00:04:30,670 --> 00:04:31,240 Cool. 69 00:04:31,950 --> 00:04:34,140 Now for the gun properties section. 70 00:04:34,140 --> 00:04:38,700 We want to be able to define if this gun is going to be automatic or semi-automatic. 71 00:04:38,700 --> 00:04:43,410 So I'll have a property, we'll call it automatic and our pistol is going to be semi-automatic. 72 00:04:43,410 --> 00:04:44,910 So we'll set this value to false. 73 00:04:45,300 --> 00:04:47,370 We can go ahead and define oops. 74 00:04:47,370 --> 00:04:48,840 Let me go ahead and put a comma here. 75 00:04:48,840 --> 00:04:53,340 We can go ahead and define the max distance that our bullet can travel. 76 00:04:53,340 --> 00:04:57,960 So when we're raycasting we want to give a cap to how far that ray can reach. 77 00:04:57,960 --> 00:05:00,900 So we'll call this our max bullet distance. 78 00:05:00,900 --> 00:05:03,540 And we'll set it to a value of like 500 studs. 79 00:05:03,660 --> 00:05:09,390 We can define how long it will take for us to reload our gun, how many seconds our reload duration 80 00:05:09,390 --> 00:05:09,750 should be. 81 00:05:09,750 --> 00:05:11,850 So we'll call it reload duration. 82 00:05:11,970 --> 00:05:14,340 And for the pistol, I want it to be pretty short. 83 00:05:14,340 --> 00:05:16,050 So we could do like two seconds. 84 00:05:16,200 --> 00:05:17,370 The fire rate. 85 00:05:17,370 --> 00:05:21,990 We can go ahead and define how many bullets we should be able to fire per minute. 86 00:05:21,990 --> 00:05:24,660 So for the fire rate I'll do something like 300. 87 00:05:26,660 --> 00:05:33,710 And then for the ammo, we want to define how much reserve ammo we can hold and how much ammo we can 88 00:05:33,710 --> 00:05:34,970 hold inside of our magazine. 89 00:05:34,970 --> 00:05:39,530 So we'll call this Max Reserve Ammo and we can set it to. 90 00:05:39,530 --> 00:05:45,170 I want to have 12 bullets in the magazine, so we'll do 60 for the reserve ammo. 91 00:05:45,170 --> 00:05:48,860 And then the Max mag ammo is going to be 12. 92 00:05:49,430 --> 00:05:55,220 And then maybe we actually also want to add a section for defining the bullet holes. 93 00:05:55,220 --> 00:05:58,400 So when our bullets hit something we want to put a bullet hole. 94 00:05:58,400 --> 00:06:03,170 And we want to shoot particles out of the bullet hole just to make it look a little bit more realistic. 95 00:06:03,260 --> 00:06:06,470 So we could define here what size the bullet hole should be. 96 00:06:06,470 --> 00:06:08,510 So bullet hole size. 97 00:06:09,670 --> 00:06:14,620 And if we actually go ahead and take a look in our game, if we go to, I believe, replicated storage, 98 00:06:14,620 --> 00:06:15,910 we go to shared. 99 00:06:15,910 --> 00:06:17,170 And I believe it's some parts. 100 00:06:17,170 --> 00:06:17,530 Here we go. 101 00:06:17,530 --> 00:06:18,760 We have our bullet hole right here. 102 00:06:18,760 --> 00:06:22,180 Let me place this in the workspace and I'll find it right here. 103 00:06:22,750 --> 00:06:29,050 So we want to be able to define what the size of this part should be depending on what it what gun fires, 104 00:06:29,050 --> 00:06:30,130 what kind of bullet. 105 00:06:30,130 --> 00:06:34,390 So if you had like a sniper rifle, of course you would want this bullet hole to be pretty large. 106 00:06:34,390 --> 00:06:39,520 You would have a value of like, I don't know, one by one stud or something like that. 107 00:06:40,120 --> 00:06:41,950 So it's a big fat bullet hole. 108 00:06:41,950 --> 00:06:48,250 But if you had a pistol, like a low caliber pistol, then you would of course want the size to be much 109 00:06:48,250 --> 00:06:50,020 smaller, maybe like 0.3. 110 00:06:50,170 --> 00:06:55,390 And if you had a pellet from like a shotgun shooting birdshot, this would even be smaller. 111 00:06:55,390 --> 00:06:59,410 You could have like a bullet hole that's only 0.1 by 0.1 studs. 112 00:06:59,410 --> 00:07:04,150 So we really want to be able to customize what the size of our bullet hole should be, depending on 113 00:07:04,150 --> 00:07:06,550 what gun is shooting the bullet. 114 00:07:07,090 --> 00:07:10,000 So we place this back inside of replicated storage. 115 00:07:10,000 --> 00:07:12,130 And we can head back into our module script. 116 00:07:12,130 --> 00:07:17,620 And for the bullet hole size of our pistol, I want it to be slightly smaller than the 0.5 size. 117 00:07:17,620 --> 00:07:19,660 So we could define a new vector three here. 118 00:07:20,240 --> 00:07:25,370 And we'll make it point three by point three, and the thickness is going to be 001. 119 00:07:26,430 --> 00:07:31,320 And then we can also define how many particles we would like to spit out of the bullet hole. 120 00:07:31,350 --> 00:07:35,370 So if we have a big caliber bullet, we want to spit out more particles. 121 00:07:35,370 --> 00:07:38,970 But if we have a small caliber bullet, we don't want to spit out that many particles. 122 00:07:38,970 --> 00:07:43,770 So we could define the bullet whole particle amount, we'll call it. 123 00:07:44,190 --> 00:07:47,220 And for my pistol, I'll just do four for now. 124 00:07:48,780 --> 00:07:50,550 And let me place a comment here. 125 00:07:50,820 --> 00:07:54,600 Now, the next section we can go ahead and define is going to be the animations. 126 00:07:54,600 --> 00:07:57,900 So we can have a key. 127 00:07:57,900 --> 00:07:59,070 We'll call it animations. 128 00:07:59,070 --> 00:08:03,930 And inside of this table we could store the different animations for like equipping the gun, shooting 129 00:08:03,930 --> 00:08:05,910 the gun, reloading the gun, stuff like that. 130 00:08:05,910 --> 00:08:09,120 So we'll have an equip animation. 131 00:08:09,450 --> 00:08:11,640 And inside of there we'll store an ID for that. 132 00:08:11,640 --> 00:08:16,860 We'll have a reload animation and then we'll have a shoot animation. 133 00:08:17,130 --> 00:08:21,690 We don't have the animations right now because we haven't made them, but once we create animations 134 00:08:21,690 --> 00:08:26,910 for our guns, we'll go ahead and take those IDs and put them into their respective property. 135 00:08:27,490 --> 00:08:31,480 Another thing we're going to want to define are the different sounds for our gun. 136 00:08:31,480 --> 00:08:34,570 For example, what sound do we want to play when we shoot the gun? 137 00:08:34,570 --> 00:08:39,340 So we could call this our shoot sound and it'll be our properties for the shoot sound. 138 00:08:39,340 --> 00:08:42,100 So we can define the volume, the range, stuff like that. 139 00:08:42,100 --> 00:08:43,600 We'll have it be a table. 140 00:08:43,600 --> 00:08:47,170 We also want to define the sound for reloading the gun. 141 00:08:47,170 --> 00:08:51,460 So we'll call this a reload sound properties. 142 00:08:51,460 --> 00:08:53,230 And then I forgot to put a comma here. 143 00:08:53,230 --> 00:08:54,340 So let me put that there. 144 00:08:54,340 --> 00:08:58,960 And then we could also define um the sound we want to play when we're out of ammo. 145 00:08:58,960 --> 00:09:02,290 So we'll play like a little click sound when we don't have any ammo left. 146 00:09:02,290 --> 00:09:05,710 So we'll just call it gun click sound properties. 147 00:09:06,680 --> 00:09:11,030 We also want to be able to add hit markers in the future for our guns. 148 00:09:11,030 --> 00:09:17,540 So we may also want to define a sound for a hit marker, because when you play games, there's a little 149 00:09:17,540 --> 00:09:20,510 sound that plays when you hit somebody with your bullets. 150 00:09:20,510 --> 00:09:22,520 So we'll call it hit marker. 151 00:09:23,320 --> 00:09:25,450 Sound properties. 152 00:09:27,150 --> 00:09:34,260 Okay, last but not least, one more thing we can go ahead and define for our gun is going to be perhaps 153 00:09:34,260 --> 00:09:38,970 configuring the muzzle flash that comes out of the barrel of our gun. 154 00:09:38,970 --> 00:09:42,600 So if we have a big caliber gun, we want to have a big bright muzzle flash. 155 00:09:42,600 --> 00:09:45,930 But if we have a small pistol, then we want the muzzle flash to be smaller. 156 00:09:45,930 --> 00:09:49,290 So we can call this our muzzle flash properties. 157 00:09:49,680 --> 00:09:55,110 And this property is going to be geared towards a point light that is inside of the muzzle. 158 00:09:55,110 --> 00:10:00,540 So we want to manipulate the different properties in the point light such as the brightness. 159 00:10:00,540 --> 00:10:02,280 What do we want to set the brightness to? 160 00:10:02,280 --> 00:10:04,380 What do we want to set the color to? 161 00:10:04,380 --> 00:10:09,600 Or what do we want to set the range of the light to stuff like that? 162 00:10:10,310 --> 00:10:13,070 So since this is a gun, I want the brightness to be pretty bright. 163 00:10:13,070 --> 00:10:14,660 We'll set it to a value of like five. 164 00:10:14,660 --> 00:10:15,500 For the color. 165 00:10:15,500 --> 00:10:25,100 We'll do a new color three from RGB and we'll pick kind of like I don't know, maybe a dark orangish 166 00:10:25,100 --> 00:10:26,060 kind of color. 167 00:10:26,060 --> 00:10:26,990 Let me see. 168 00:10:26,990 --> 00:10:29,330 It'll be like a yellowish orange color. 169 00:10:31,290 --> 00:10:34,830 We'll do something like that for now and then for the range. 170 00:10:34,830 --> 00:10:37,830 Since this is a pistol, I don't want the range to be that big. 171 00:10:37,830 --> 00:10:39,750 So we'll do something like five studs. 172 00:10:39,930 --> 00:10:42,990 And then I also want to have shadows enabled for this point life. 173 00:10:42,990 --> 00:10:46,140 So we'll set shadows equal to true okay. 174 00:10:46,140 --> 00:10:46,860 Perfect. 175 00:10:47,710 --> 00:10:53,380 So now what I'm going to do is I'm going to scour through the toolbox and look through different audio 176 00:10:53,380 --> 00:11:00,340 files to try to find a good sound for shooting the pistol, reloading for the gun click, and for the 177 00:11:00,340 --> 00:11:00,850 hit marker. 178 00:11:00,850 --> 00:11:03,970 So I'll get back to you when I find any good sound IDs. 179 00:11:04,600 --> 00:11:10,300 Okay, here I have found several good audios for shooting reloading the click sound and the hit marker 180 00:11:10,300 --> 00:11:11,950 sound for our gun. 181 00:11:11,950 --> 00:11:16,060 So let me go ahead and copy these IDs so you can go ahead and hear what it sounds like. 182 00:11:16,060 --> 00:11:19,300 So this is going to be the shoot sound for our pistol I'll play it for you. 183 00:11:20,050 --> 00:11:22,780 Very simple for the reload sound. 184 00:11:22,780 --> 00:11:24,850 This is the sound that I've picked. 185 00:11:27,740 --> 00:11:29,870 For the gun click sound. 186 00:11:29,870 --> 00:11:31,430 We'll play this sound. 187 00:11:32,160 --> 00:11:32,970 Very simple. 188 00:11:32,970 --> 00:11:36,540 And then for the hit marker sound, we're going to be playing this sound. 189 00:11:38,960 --> 00:11:45,770 And we can basically just use the exact same hit marker gun, click and reload sound across all of our 190 00:11:45,770 --> 00:11:46,190 guns. 191 00:11:46,190 --> 00:11:50,270 The main one you'll want to change is going to be the shoot sound for your gun. 192 00:11:51,690 --> 00:11:56,550 Now we can go ahead and define some of the other properties we would like for our sound instance. 193 00:11:56,550 --> 00:12:02,190 For example, we can go ahead and change the roll off mode and I'm going to set it equal to the enum 194 00:12:02,190 --> 00:12:04,710 dot roll off mode of inverse tapered. 195 00:12:04,710 --> 00:12:10,020 And I'm going to basically do that for all of my sounds because I like this mode the best. 196 00:12:10,020 --> 00:12:11,160 So we'll do that. 197 00:12:11,160 --> 00:12:14,640 We'll paste that paste that for each one of them. 198 00:12:15,180 --> 00:12:19,050 The hit marker sound actually doesn't matter because we're going to play this on the client side. 199 00:12:19,050 --> 00:12:20,790 So we don't need to play it in the workspace. 200 00:12:20,790 --> 00:12:23,310 So I don't need to worry about a roll off mode or anything. 201 00:12:23,310 --> 00:12:26,910 I think the only thing I'll need to worry about for the hit marker sound is going to be the volume, 202 00:12:27,930 --> 00:12:33,450 but for the other guns, what we can go ahead and do is define some of the other properties, such as 203 00:12:33,450 --> 00:12:36,330 the roll off max distance for the shoot sound. 204 00:12:36,330 --> 00:12:37,680 I want that to be pretty far. 205 00:12:37,680 --> 00:12:42,930 We could do something like 85 studs and then for the roll off min distance we could do something like 206 00:12:42,930 --> 00:12:44,160 25 studs. 207 00:12:44,280 --> 00:12:48,060 And for the volume I want to keep it at a volume of one. 208 00:12:48,060 --> 00:12:50,160 So it's pretty loud for the shoot sound. 209 00:12:51,390 --> 00:12:57,660 And then we can basically just copy this, go back in here and then just paste those properties inside 210 00:12:57,660 --> 00:12:58,980 of these sounds. 211 00:12:58,980 --> 00:13:02,850 So let me do this, paste that there for the reload sound. 212 00:13:02,850 --> 00:13:05,670 I don't want it to be too loud and I don't want to hear it from too far away. 213 00:13:05,670 --> 00:13:11,280 So we'll just do like 25 and 15 and the volume will make like 0.6. 214 00:13:11,550 --> 00:13:16,320 And for the gun click sound again we'll do 2515. 215 00:13:16,320 --> 00:13:18,660 And the click sound is actually pretty quiet. 216 00:13:18,660 --> 00:13:20,850 So I want to bump up the volume a little bit. 217 00:13:20,850 --> 00:13:23,940 I could do something like uh 1.5. 218 00:13:24,450 --> 00:13:31,560 So now that we have the basic setup for the gun properties, we can just go ahead and copy this module 219 00:13:31,560 --> 00:13:37,050 script and put it inside of all of our guns and just kind of manipulate or change these values for each 220 00:13:37,050 --> 00:13:38,220 one of our guns. 221 00:13:38,910 --> 00:13:41,490 So I'm going to do that for all of my guns real quick. 222 00:13:41,490 --> 00:13:44,910 And if you would like to use the same properties that I'm going to be using, I'll have attached to 223 00:13:44,910 --> 00:13:51,270 this lecture all of the different guns with the property module scripts attached to them, filled with 224 00:13:51,480 --> 00:13:55,770 the different sound instances and the different properties for each one of the guns. 225 00:13:55,770 --> 00:14:00,720 So I'll see you when I've copied all of these properties and adjusted them for each of the guns. 226 00:14:01,220 --> 00:14:07,130 Okay, so I have gone through and adjusted all of the properties for each one of the guns in my game. 227 00:14:07,130 --> 00:14:12,740 So for example, with my assault rifle, I've gone in here, adjusted the damage and the body part multipliers. 228 00:14:12,740 --> 00:14:18,740 I've adjusted some of the gun properties, the bullet hole size, I've changed the shoot sound, and 229 00:14:18,740 --> 00:14:21,860 I've also adjusted the muzzle flash properties a little bit. 230 00:14:21,860 --> 00:14:25,640 Actually, let me make the range a little bit larger for the assault rifle. 231 00:14:25,640 --> 00:14:31,160 So I've kind of changed around a couple of properties and then I've done the same for my SMG. 232 00:14:31,340 --> 00:14:34,430 I've made it automatic, changed up the fire rate, stuff like that. 233 00:14:34,430 --> 00:14:39,320 Now, however, I have done something a little bit different for the shotguns in my game. 234 00:14:39,320 --> 00:14:45,680 So for example, this is the properties for my semi-automatic shotgun and I've added a few extra properties 235 00:14:45,680 --> 00:14:47,120 just for the shotguns in our game. 236 00:14:47,120 --> 00:14:53,630 If we scroll down, I've added these three properties to define the type of round for our shotgun, 237 00:14:53,630 --> 00:14:59,570 how many pellets the shotgun should shoot out, and then what the spread should be for the shotgun. 238 00:14:59,570 --> 00:15:05,900 So for example, if we have the string of the round type set to like buckshot or birdshot, then we're 239 00:15:05,900 --> 00:15:13,370 going to use that to tell the script to spread the pellets outwards in a random manner, like a real 240 00:15:13,370 --> 00:15:15,980 shotgun would shoot out pellets. 241 00:15:15,980 --> 00:15:21,620 If we were to set the string to something like slug, then we're telling our script that we don't want 242 00:15:21,620 --> 00:15:27,530 any spread whatsoever for our guns, because it's just going to be one big slug coming out of our shotgun. 243 00:15:27,530 --> 00:15:32,450 But of course, we can still manipulate that based on the amount of pellets that are going to be coming 244 00:15:32,450 --> 00:15:33,680 out of the shotgun. 245 00:15:33,680 --> 00:15:36,290 So that's what we've done for the shotguns here. 246 00:15:36,290 --> 00:15:42,200 And I've also gone ahead and added one additional sound properties for shotguns, and I've called it 247 00:15:42,200 --> 00:15:44,270 shotgun pump Sound Properties. 248 00:15:45,090 --> 00:15:50,850 And I put it in a sound ID here, and I basically want to play this sound during the reload animation, 249 00:15:50,850 --> 00:15:54,210 where we'll play a pump sound like we're racking the shotgun. 250 00:15:54,210 --> 00:16:00,570 So I've added that as well, and I believe that is all of the properties that I've added for my shotguns. 251 00:16:00,570 --> 00:16:06,900 So I've added an additional sound as well as a couple or a few other shotgun properties. 252 00:16:06,900 --> 00:16:12,840 So if I go ahead and take a look at, for example, my slug shotgun, I've set the round type to slug, 253 00:16:12,840 --> 00:16:17,400 and I've defined that there should be only one pellet coming out of my slug shotgun. 254 00:16:17,400 --> 00:16:23,730 And since slug shotguns will mess you up, I've increased the damage a lot and increased the multipliers, 255 00:16:23,730 --> 00:16:25,350 especially for like, headshots. 256 00:16:25,970 --> 00:16:28,520 I also have this other little fun gun here, I think. 257 00:16:28,520 --> 00:16:32,000 I'm not sure what I'm going to do with this gun, but it's just going to be like a little fun testing 258 00:16:32,000 --> 00:16:38,960 gun where it has just some absolutely insane properties, a crazy amount of ammo, a high fire rate, 259 00:16:38,960 --> 00:16:40,550 and it does crazy damage. 260 00:16:40,550 --> 00:16:45,080 So this is going to be kind of like a fun little experiment gun that we're going to use later when we're 261 00:16:45,080 --> 00:16:46,940 done scripting our guns. 262 00:16:47,360 --> 00:16:51,800 But now we have all the respective properties set up for every single gun in our game. 263 00:16:51,800 --> 00:16:56,390 All of these guns with their properties have been attached to the lecture for you to use if you would 264 00:16:56,390 --> 00:16:57,470 like to use them. 265 00:16:58,190 --> 00:17:03,560 And other than that, we're now ready to start scripting the guns for our game. 266 00:17:03,560 --> 00:17:10,220 So that includes scripting the muzzle flash, shooting out array and seeing if we hit anything. 267 00:17:10,250 --> 00:17:17,150 Being able to reload our guns and display how much ammo we have with these guys that are inside of our 268 00:17:17,150 --> 00:17:17,540 guns. 269 00:17:17,540 --> 00:17:19,790 So let's actually take a look at one of these guys. 270 00:17:19,790 --> 00:17:24,590 I'll change the parent of this guy to my starter guy service. 271 00:17:24,590 --> 00:17:28,850 So we'll go down, place it in there and then let me enable UI visibility. 272 00:17:29,150 --> 00:17:31,520 So here is our simple gun guy. 273 00:17:31,550 --> 00:17:33,470 It'll just say the name of the gun. 274 00:17:33,470 --> 00:17:39,530 And then we have a couple of text labels here to tell us how much magazine ammo we have left and then 275 00:17:39,530 --> 00:17:41,510 how much reserve ammo we have left. 276 00:17:41,510 --> 00:17:44,450 And then we also have an image of a hit marker. 277 00:17:44,540 --> 00:17:51,410 And we're going to be moving this hit marker around when we hit something with our gun, and we'll just 278 00:17:51,410 --> 00:17:54,560 place the hit marker around our mouse icon. 279 00:17:54,560 --> 00:17:56,390 So it looks like, you know, we shot something. 280 00:17:56,970 --> 00:18:00,900 So let me go ahead and move this guy back inside of its gun. 281 00:18:00,900 --> 00:18:04,830 So let me go back to server storage and put it back in my assault rifle. 282 00:18:05,190 --> 00:18:08,160 And other than that, we are ready to start scripting our guns. 283 00:18:08,160 --> 00:18:10,350 So I'll see you in the next lecture.